<?php
$caption = BUtils::T('account_lbl');
$this->pageTitle = Yii::app()->name . ' - ' . $caption;
?>
<div class="container prepend-top append-bottom">
	
	<div class="span-14">
		<div class="box_white append-bottom">
		<div class="biz-form">
			<div class="margin">
				<h3><?php echo $caption; ?></h3>
			</div>
<?php if (Yii::app()->user->hasFlash('account')) { ?>
<div class="flash-success fieldswrap ui-widget">
	<div class="ui-state-highlight" style="background:#efe; padding:15px;">
		<span class="ui-icon ui-icon-info" style="float:left; margin-right:.3em;"></span> 
		<?php echo Yii::app()->user->getFlash('account'); ?>
	</div>
</div>
<?php } ?>
<?php if (Yii::app()->user->hasFlash('account_failed')) { ?>
<div class="flash-success fieldswrap ui-widget">
	<div class="ui-state-error" style="background:#fee; padding:15px;">
		<span class="ui-icon ui-icon-info" style="float:left; margin-right:.3em;"></span> 
		<?php echo Yii::app()->user->getFlash('account_failed'); ?>
	</div>
</div>
<?php } ?>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'merchant-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

<div class="fieldswrap">
<div class="fields">
	<div class="block">
		<div class="lbl">
			<?php echo $form->labelEx($model,'email'); ?>
		</div>
		<div class="ipt">
			<?php echo $form->textField($model,'new_email', array('class'=>'auto', 'value'=>$model->email)); ?>
			<?php echo $form->error($model,'new_email'); ?>
			<?php echo $form->hiddenField($model,'email'); ?>
		</div>
	</div>
	<div class="block">
		<div class="lbl"><?php echo $form->labelEx($model,'password'); ?></div>
		<div class="ipt">
			<?php echo $form->passwordField($model,'password', array('class'=>'auto', 'value'=>'')); ?>
			<?php echo $form->error($model,'password'); ?>
		</div>
	</div>
	<div class="block">
		<div class="lbl"><?php echo $form->labelEx($model,'new_password'); ?></div>
		<div class="ipt">
			<?php echo $form->passwordField($model,'new_password', array('class'=>'auto')); ?>
			<?php echo $form->error($model,'new_password'); ?>
		</div>
	</div>
	<div class="block">
		<div class="lbl"><?php echo $form->labelEx($model,'new_password_repeat'); ?></div>
		<div class="ipt">
			<?php echo $form->passwordField($model,'new_password_repeat', array('class'=>'auto')); ?>
			<?php echo $form->error($model,'new_password_repeat'); ?>
		</div>
	</div>
</div><!-- end of .fields -->
</div><!-- end of .fieldswrap -->

	<div class="margin actions">
		<?php echo CHtml::submitButton(BUtils::T('save_changes_btn'), array('class' => 'button button-huge button-confirm')); ?>
		<?php echo CHtml::button(BUtils::T('cancel_btn'), array('class'=>'button button-huge button-thin', 'onclick'=>'history.go(-1);', 'confirm'=>BUtils::T('cancel_btn_msg'))); ?>
	</div>

<?php $this->endWidget(); ?>
			
		</div><!-- end of <div class="biz-form"> -->
		</div>
	</div>
	
	<div class="span-10 right last">
		<?php BHelper::HtmlCompletionTips(); ?>
	</div>
	
</div>